/**
 *
 */
package com.jycode.ishop.dao;

import org.springframework.stereotype.Repository;

import com.jycode.commons.genericdao.GenericHibernateDAO;
import com.jycode.ishop.model.Person;

/**
 * @author "banlyst <banlyst@gmail.com>"
 *
 */
@Repository("personDAO")
public class PersonDAOImpl extends GenericHibernateDAO<Person, Long> implements PersonDAO {

	/**
	 * @param persistentClass
	 */
	public PersonDAOImpl() {
		super(Person.class);
	}

	/* (non-Javadoc)
	 * @see com.jycode.ishop.dao.PersonDAO#findByName(java.lang.String)
	 */
	public Person findByName(String name) {
		return uniqueResult(findByNamedQuery("findByName", name));
	}

}
